﻿using System.Net.Http;
using Abp.AspNetCore.Mvc.Controllers;
using Abp.AspNetCore.Mvc.Proxying;
using Abp.Web.Api.ProxyScripting;
using Microsoft.AspNetCore.Mvc;

namespace Xugege.AbpExtension.Web.Core.Extension.Controllers.Scripts
{
    public class AbpServiceProxiesController: AbpController
    {
        
        private readonly IApiProxyScriptManager _proxyScriptManager;
        public AbpServiceProxiesController(IApiProxyScriptManager proxyScriptManager)
        {
            _proxyScriptManager = proxyScriptManager;
        }

        
        public JsonResult GetAllScript(ApiProxyGenerationModel model)
        {
            
            return Json(_proxyScriptManager.GetScript(model.CreateOptions()));
        }
    }
}
